<?php
include_once 'header.php';
?>
<style>
    #body {
        height: 1000px;
        width: 100%;
        background-color: #d3d3d3;
        display: flex;
        justify-content: space-between;
    }
    #body_left {
        width: 70%;
        height: 100%;
        /*background-color: white;*/
    }
    #body_right {
        width: 28%;
        height: 100%;
        /*background-color: greenyellow;*/
    }
    #fenlei {
        height: 25%;
        width: 100%;
        /*background-color: white;*/
    }
    #lianjie {
        height: 25%;
        width: 100%;
        /*background-color: white;*/
    }
    #information {
        height: 50%;
        width: 100%;
        /*background-color: white;*/
    }
    .title {
        height: 40px;
        background-color: #efeded;
        line-height: 30px;
    }
    .message {
        margin-left: 10px;
        margin-bottom: 10px;
        width: 70px;
        border: 1px solid #bbb7bb;
        float: left;
    }
    .message2 {
        margin-left: 10px;
        width: 50px;
        border: 1px solid #bbb7bb;

    }
    .message1 {
        margin-left: 10px;
    }
    .message3 {
        margin-left: 10px;
        margin-top: 10px;
        width: 70px;
        border: 1px solid #bbb7bb;
    }
</style>
<div id="body_left">
    <div id="body_left_title" style="height: 60px">
        <div style="margin-left:15px; background-color: white; height: 400px;">
            <p class="title">&nbsp mybbs >> 设置</p>
            <form id="set_info" method="post" action="doaction.php?action=set_personal_info&name=<?php echo $name ?>">
                <table style="margin-top:20px;margin-left:30px;height: 300px">
                    <tr>
                        <td style="text-align:right">用户名</td>
                        <td><?php echo $name ?></td>
                    </tr>
                    <tr>
                        <td style="text-align:right">电子邮件</td>
                        <td><input type="text" name="useremail" style="width:100px">不公开,仅供取回密码,务必正确填写且记住.</td>
                    </tr>
                    <tr>
                        <td style="text-align:right">个人网站</td>
                        <td><input type="text" name="usernet"></td>
                    </tr>
                    <tr>
                        <td style="text-align:right">个人简介</td>
                        <td><textarea style="height:130px;" name="textarea" form="set_info"></textarea></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input type="submit" name="submit" value="保存设置"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div style="margin-left:15px; background-color: white; height: 250px;">
            <p class="title">&nbsp 设置头像</p>
            <form method="post" action="doaction.php?action=set_pic&name=<?php echo $name ?>">
                <table style="margin-top:15px;margin-left:30px;height: 180px">
                    <tr>
                        <td style="text-align:right">当前头像</td>
                        <td colspan="2"><img src="image/1.png" style="height:30px"><img src="image/1.png" style="height:25px"><img src="image/1.png"style="height:20px"></td>
                    </tr>
                    <tr>
                        <td style="text-align:right">选择头像图片</td>
                        <td><input type="file" name="set_pic"></td>
                        <td>(最大300K)</td>
                    </tr>
                    <tr>
                        <td></td>
                        <td colspan="2"><input type="submit" name="submit" value="更新头像"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div style="margin-left:15px; background-color: white; height: 250px;">
            <p class="title">&nbsp 更改密码</p>
            <form method="post" action="doaction.php?action=set_psw&name=<?php echo $name ?>">
                <table style="margin-top:15px;margin-left:30px;height: 180px">
                    <tr>
                        <td style="text-align:right">当前密码</td>
                        <td><input type="text" name="old_psw" value="zhangsan"></td>
                    </tr>
                    <tr>
                        <td style="text-align:right">新密码</td>
                        <td><input type="text" name="new_psw1" value="zhangsan"></td>
                    </tr><tr>
                        <td style="text-align:right">再次输入新密码</td>
                        <td><input type="text" name="new_psw2" value="zhangsan"></td>
                    </tr><tr>
                        <td></td>
                        <td><input type="submit" name="submit" value="更新密码"></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<div id="body_right">
    <div id="fenlei">
        <div style="margin-top:10px; background-color: white; height: 120px;">
            <p class="title">&nbsp管理员面板 (MyBBS官方支持)</p>
            <div class="message"><a href="fenleiguanli.php">分类管理</a></div>
            <div class="message"><a href="fenleiguanli.php">网站设置</a></div>
            <div class="message"><a href="fenleiguanli.php">用户管理</a></div>
            <div class="message"><a href="fenleiguanli.php">链接管理</a></div>
        </div>
        <div style="margin-top:10px; background-color: white; height: 120px; display: flex; flex-direction: column;">
            <div class="title">&nbsp最近添加的分类</div>
            <div style="display: flex;">
                <?php foreach ($yunbbs_categories as $key => $value) { ?>
                    <div class="message3"><a href="#"><?php echo $value['name'] ?></a></div>
                    <?php }
                    ?>
            </div>
        </div>
    </div>
</div>

<?php
include_once 'footer.php';
?>

